<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGoodsBrandsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods_brands', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment("品牌名称");
            $table->string('image',100)->comment('品牌图片');
            $table->text('description')->comment("品牌描述")->nullable();
            $table->unsignedInteger('sorting')->comment("排序")->default(0)->nullable() ;
            $table->string('letter',100)->comment('品牌的首字母')->nullable();  //暂时不用后期可能需要
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('goods_brands');
    }
}
